/**
 * 报价 api 封装
 */
import {getRequest, postRequest, request} from '/@/lib/axios';

export const deliveryOrderApi = {

    /**
     * 分页查询
     */
    queryPage: (param) => {
        return postRequest('/machineDelivery/queryPage', param);
    },
    /**
     * 分页查询库存机器
     */
    queryDeliveryDevice: (param) => {
        return postRequest('/machineDelivery/queryPageForDelivery', param);
    },
    /**
     * 通知快递
     */
    informExpress: (ids) => {
        return postRequest(`/machineDelivery/noteExp?ids=${ids}`, {});
    },
    /**
     * 新增出库单
     */
    addDelivery: (param) => {
        return postRequest(`/machineDelivery/add`, param);
    },
    /**
     * 查询出库单详情
     */
    getDeliveryDetail: (id) => {
        return postRequest(`/machineDelivery/detail/${id}`, {});
    },
    /**
     * 出库
     */
    outStorage: (ids) => {
        return postRequest(`/machineDelivery/outStorage?ids=${ids}`, {});
    },
    /**
     * 作废出库单
     */
    cancellationDelivery: (id) => {
        return getRequest(`/machineDelivery/delete/${id}`, {});
    },
    /**
     * 获取顺丰面单url、token
     */
    getSFInfo: (id) => {
        // return getRequest(`/order/sf/temple`,param);
        return request({
            url: `/machineDelivery/printDelivery/${id}`,
            method: 'GET',
            responseType: 'blob'
        });
    },

};
